﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	TempData學習
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

  
<%
    IQueryable<Asp.netMvc.Models.tblRouteD> Data = (IQueryable<Asp.netMvc.Models.tblRouteD>)TempData["TestData"];

     %>


<%
    Repeater1.DataSource = Data;
    Repeater1.DataBind();
     %>

    <h2>TempData學習
    
    TempData 只能从 Control 加载后使用一次,再刷新页面就没有了
    
    </h2>
<%=ViewData["Data"]%>
<ul>


<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li>
<%#Eval("站名") %>
</li>
</ItemTemplate>
        </asp:Repeater>
</ul>




</asp:Content>
